<template>
	<el-drawer title="工作记录详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="排序号" prop="sortNo">{{ form.sortNo }}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="关联人员" prop="userId">{{ form.userName }}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="就职公司" prop="compName">{{ form.compName }}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="所在部门" prop="deptName">{{ form.deptName }}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="所属行业" prop="industry">{{ form.industry }}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="公司类型" prop="nature">{{ form.natureName }}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="担任职务" prop="post">{{ form.post }}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="证明人" prop="cerifier">{{ form.cerifier }}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="入职日期" prop="beginTime">{{ form.beginTime }}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="离职日期" prop="endTime">{{ form.endTime }}
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="工作内容">{{ form.jobContent }}
					</el-form-item>
					<el-form-item label="工作成就">{{ form.achievement }}
					</el-form-item>
					<el-form-item label="离职原因">{{ form.reasonForLeave }}
					</el-form-item>
					<el-form-item label="证照附件" v-if="form.attachId!=''">
						<attach-menu :attachIds="form.attachId" :roleFlag="3" :preview="true" ></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'

export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				recordId: '',
				userName: '',
				sortNo: '',
				compName: '',
				deptName: '',
				industry: '',
				natureName: "",
				post: "",
				cerifier: "",
				beginTime: '',
				endTime: '',
				jobContent: '',
				achievement: '',
				reasonForLeave: '',
				attachId: '',
				remark: ''
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model) {
			this.model = model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data) {
			this.form.recordId = data.recordId
			this.form.userName = data.userName
			this.form.sortNo = data.sortNo
			this.form.compName = data.compName
			this.form.deptName = data.deptName
			this.form.industry = data.industry
			this.form.natureName = data.natureName
			this.form.post = data.post
			this.form.cerifier = data.cerifier
			this.form.beginTime = data.beginTime
			this.form.endTime = data.endTime
			this.form.jobContent = data.jobContent
			this.form.achievement = data.achievement
			this.form.reasonForLeave = data.reasonForLeave
			this.form.attachId = data.attachId
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
